1. Field of the Invention
The present invention relates to a packet transfer communication device. More particularly, the present invention relates to a congestion control unit to conduct a packet discarding disposal in the case of congestion caused in a core router or edge router in communication over the Internet in which variable-length packets are used.
2. Description of the Related Art
Recently, the Internet has spread all over the world, and communication in which variable-length data, such as IP (Internet Protocol) packets, are used has become mainstream. In a conventional Internet service, a best-effort type service, in which quality, such as prevention of delay or guarantee bandwidth, is not guaranteed at all, is mainly provided.
However, recently, new services such as VoIP (Voice over IP), in which voice signals from a telephone are carried by IP packets, and VPN (Virtual Private Network), in which exclusive lines for enterprises can be realized on the Internet, have appeared on the market. Accordingly, a guaranteed QoS (Quality of Service) has become important even on the Internet. Congestion control is one of the functions of QoS.
When the input rate with respect to a node is higher than the output rate of the node, there is a possibility of the occurrence of congestion. In order to solve the problems caused by the congestion, it is common that data packets, which have been inputted in the case of congestion, are discarded under certain conditions. As a result, the quality of data is deteriorated, and it becomes impossible to provide a service in which a predetermined quality is guaranteed. Accordingly, it is important to conduct the congestion control, described above, correctly.
FIG. 1 is a view showing an example of RED (Random Early Discard) which is a typical congestion control method of the prior art.
FIG. 1 is a graph showing a relation between the average queue length (avg: average) and the packet discarding probability (pb: probability) in RED. The average queue length can be found by the following formula (1). In this formula, avg is an average queue length, q is an actual queue length, Wq is a weight coefficient of a queue, and t is the interval of the measurement times.avg(t)=(1−Wq)×avg(t−1)+Wq×q  (1)
In FIG. 1, when the average queue length is not more than the minimum threshold value, the packet discarding probability is “0” (no packets are discard), and when the average queue length is not less than the maximum threshold value, the packet discarding probability is “1” (all packets are discard). In a range between the minimum threshold value and the maximum threshold value, the packet discarding probability (pb) can be found by the following formula (2), and the packets are discarded according to the value found by this formula. In this case, pb is a packet discarding probability, maxp is the maximum probability, minTH is the minimum threshold value, and maxTH is the maximum threshold value.pb=maxP×(avg−minTH)/(maxTH−minTH)  (2)
FIG. 2 is a view showing an example of the structure of a common RED function of the prior art.
In the congestion control section 1, the packet discarding judgment section 11 outputs an input packet into each queue 131 to 13n of the output queue 2 which is classified by the priority of QoS or, alternatively, the packet discarding judgment section 11 selects a predetermined number of the input packets of the corresponding class at random according to the packet discarding probability of each class informed from the average queue length calculating section 12, and the thus selected packets are discarded. The output queue 2 preferentially outputs packets in the queue of high priority.
In the average queue length calculating section 12, queues 131 to 13n in each class of the output queue 2 are scanned at a predetermined period, and the actual queue length q of each class is measured and then the average queue length (avg) is found by the formula (1). Then, the packet discarding probability (pb) is found by the formula (2). The packet discarding probability of each class is informed to the packet discarding judgment section 11 as described before.
However, in the congestion control system in which RED is used, it is necessary to conduct calculations by the formulas (1) and (2). Especially, when the average queue length is calculated, it becomes necessary to conduct the calculation of formula (1) at each measurement time interval t. In this case, when the average queue length is calculated, a calculation such as a multiplication, which requires a long processing time, must be repeatedly carried out. Therefore, a very heavy load is given to the congestion control unit. Further, since communication speed has been increased recently, it is necessary for the core router to handle a data rate of several G bpS, and also, it is necessary for the edge router to handle the data rate of several hundred M bpS. Therefore, the period of time which can be allotted to the above calculation tends to be reduced.